package com.cavy.platform.client.domain;

/**
 * Created by tangxu on 18-7-30.
 */
public interface ContainerRunnable {

    /**
     * 容器化运行接口
     *
     * @param parameter 运行的上下文参数
     * @param index     并行运行时,索引
     * @throws ContainerRunningException 运行发生的异常
     */
    void run(RunningParameter parameter, int index) throws ContainerRunningException, InterruptedException;

    /**
     * 停止
     */
    void stop() throws InterruptedException, ContainerRunningException;
}
